package com.cqggrw.interceptorAndFilter;

import com.cqggrw.util.Utils;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

public class UrlInterceptor extends AbstractInterceptor {

	private static final long serialVersionUID = 1L;

	@Override
	public String intercept(ActionInvocation invocation) throws Exception {
		
		long time = System.currentTimeMillis();
		String result = null;
		result = invocation.invoke();
		Utils.log((System.currentTimeMillis() - time) + "ms");
		return result;
	}
	
	public void before() {
		
	}
	
	public void after() {
		
	}

}
